﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Homepage.Master" AutoEventWireup="true"
    CodeBehind="lichsugiaodich.aspx.cs" Inherits="LogisticSystem.lichsugiaodich" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_content" runat="server">
    <div class="title">
        &nbsp; &nbsp; &nbsp; DANH SÁCH ĐƠN ĐẶT HÀNG</div>
    <br />
    <br />
    <script type="text/javascript">
        //Lấy danh sách đơn hàng theo khách hàng
        var SERVICE_URL_DSDH = "http://localhost:1237/LogisticsService.svc/donhang/KH00000001";
        $(document).ready(function () { $.get(SERVICE_URL_DSDH, DanhSachDonHang) });
        function DanhSachDonHang(data) {
            for (var i = 0; i < data.length; i++) {
                var a = '"chitietdonhang.aspx?MaDonHang=' + data[i].MaDonHang + '"';

                $("#table").append("<tr><td><p>" + data[i].MaDonHang + "</p></td>"
                                   + "<td><p>" + data[i].NgayDat + "</p></td>"
                                   + "<td><p>" + data[i].NgayLayHang + "</p></td>"

                                   + "<td><p>" + data[i].TongTien + "</p></td></tr>"
                                   + "<td><li><a href=" + a.toString() + ">Chi Tiết</a></li></td></tr>"

                                   );
            }
        }
    </script>
    <table id="table" border="1"  cellpadding="10" cellspacing="0" style="text-align: center">
        <tr>
            <td class='td'>
                Mã đơn hàng
            </td>
            <td class='td'>
                Ngày đặt
            </td>
            <td class='td'>
                Ngày lấy
            </td>
            <td class='td'>
                Tổng tiền
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cph_sidebar" runat="server">
</asp:Content>
